import { defineConfig } from 'vitepress'
import { fileURLToPath, URL } from 'node:url'




export default defineConfig({
  title: "MineCosmos",
  description: "✨一个以Minecraft为中心展开的宇宙平台✨",
  base: '/docs',
  head: [
    [
      'link',
      { rel: 'icon', href: '/logo/sm-logo.png', type: "image/svg+xml" }
    ]
  ],

  themeConfig: {
    logo: '/logo/md-logo.png',
    // https://vitepress.dev/reference/default-theme-config
    nav: [
      { text: '首页', link: '/' },
      { text: '关于', link: '/about/' }
    ],


    sidebar: [
      {
        text: '指南',
        items: [
          { text: '快速开始', link: '/guide/quick-started' },
          { text: '常见问题', link: '/guide/description' }
        ]
      },
      {
        text: '关于',
        link: '/about/'
      }
    ],

    socialLinks: [
      { icon: { svg: '<svg t="1695403836627" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3386" width="36" height="36"><path d="M512 1024C229.248 1024 0 794.752 0 512S229.248 0 512 0s512 229.248 512 512-229.248 512-512 512z m259.168-568.896h-290.752a25.28 25.28 0 0 0-25.28 25.28l-0.032 63.232c0 13.952 11.296 25.28 25.28 25.28h177.024a25.28 25.28 0 0 1 25.28 25.28v12.64a75.84 75.84 0 0 1-75.84 75.84h-240.224a25.28 25.28 0 0 1-25.28-25.28v-240.192a75.84 75.84 0 0 1 75.84-75.84h353.92a25.28 25.28 0 0 0 25.28-25.28l0.064-63.2a25.312 25.312 0 0 0-25.28-25.312H417.184a189.632 189.632 0 0 0-189.632 189.6v353.952c0 13.952 11.328 25.28 25.28 25.28h372.928a170.656 170.656 0 0 0 170.656-170.656v-145.376a25.28 25.28 0 0 0-25.28-25.28z" p-id="3387" fill="#515151"></path></svg>' }, link: 'https://gitee.com/xintianyuehui_ln/minecraft-abcserver-web', ariaLabel: 'gitee' }
    ],
    editLink: {
      pattern: 'https://gitee.com/xintianyuehui_ln/minecraft-abcserver-web/docs/:path',
      text: '编辑此页'
    },
    footer: {
      message: 'MIT Licensed ',
      copyright: 'Copyright © 2023-present  <a href="https://github.com/NingLiu1998">xintianyuehui_ln</a> '
    },
    lastUpdatedText: '最后更新时间',
  },
  lastUpdated: true,
  // component replace
  vite: {
    resolve: {
      alias: [
        {
          find: /^.*\/VPSwitchAppearance\.vue$/,
          replacement: fileURLToPath(
            new URL('./theme/components/vp-theme-apperence.vue', import.meta.url)
          )
        }
      ]
    },
  }
})
